package http

import (
	sessionHandler "gitee.com/zaiqiang231/go-base-session/app/http/handler"
	httpHandler "gitee.com/zaiqiang231/zcamp-service-file/app/http/handler"
	"github.com/gin-gonic/gin"
)

func InitRouter(g *gin.Engine) {
	g.Use(gin.Logger(), gin.Recovery())
	//跨域 设置
	g.Use(sessionHandler.Cors())
	//原子参数
	g.Use(sessionHandler.AtomFunc)

	camp := g.Group("/file")
	{
		camp.POST("/upload", httpHandler.AuthCheckFunc, httpHandler.UploadFile)
	}

}
